<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />		
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--【备注】手机浏览识别，以上4个元标记*必须*在头部；-->
		<title>司机已接单</title>
		<!--标准mui.css，公共样式-->
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link href="../css/iconfont/iconfont.css" rel="stylesheet"/>
		<link href="../css/public.css" rel="stylesheet"/>
		<!--自定义个人端样式-->
		<link rel="stylesheet" type="text/css" href="../css/map/stype.css"/>	
	    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=A8773a52f6d9bc0ecaea7f15acdd13e0"></script>
	    <style>	    	
	    </style>
	</head>		 
	<body>
		<!-- 主页面标题 -->
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left color6"></a>
		    <h1 class="mui-title">司机已接单</h1>
		    <a href="order_cancel.html" class="mui-pull-right mui-icon">
		    	<h5 class="color_green">取消订单</h5>
		    </a>
		</header>
		<div class="mui-content">	
			<div class="fixed">
				<form class="mui-input-group">
				    <div class="mui-input-row b_b1">
				        <label><span class="iconfont mui-icon font22 colorP icon-dian-copy"></span></label>
				        <input type="text" class="mui-input-clear mui-pull-left" id="initial_position" placeholder="正在获取当前位置" value="">
				    </div>
				    <div class="mui-input-row">
				        <label><span class="iconfont mui-icon font22 color_orange icon-dian-copy"></span></label>
				        <input type="text" class="w80 mui-pull-left" id="map_num" placeholder="请输入目的地">				    	
				    </div>
				</form>	
				<div class="mui-mid p_t11 m_tb50">
				    <p>小费：</p><input id="call_driver" class="mui-numbox-input" type="number" placeholder="0元" value="">
				    <span class="mui-h5">(小费金额在5-200元之间 )</span>
				    <button type="button" class="mui-btn mui-btn-green w100 p_tb11_lr15 font16 bg_green b_r8" onclick="tool.openNewPage('Immediate.html')">立即下单</button>
				    <button type="button" class="mui-btn mui-btn-grey w100 p_tb11_lr15 font16 bg_grey b_r8" onclick="tool.openNewPage('passenger.html')">代叫</button>
				</div>
			</div>
			<div class="content" id="allmap"></div>
			<div id="div_show"></div>
		</div>				
	</body>
	<!-- Mui core JavaScript-->
	<script type="text/javascript" src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script>
	<script type="text/javascript" src="../js/appconfig.js"></script>
	<!--地图-->
	<script src="../js/map/home.js" type="text/javascript" charset="utf-8"></script>
	<script>
		mui.init();		
		//马上推荐
		function Recom(){
			tool.openNewPage('my_recommend.html');
		}
		//司机信息
		function Cars(){
			tool.openNewPage('driver_info.html');
		}	
		//地图高度
		var h=$(window).height()-45;
		$('.mui-content').css("height",h+"px");
		
		document.addEventListener( "plusready", onPlusReady, false );
		// 扩展API加载完毕，现在可以正常调用扩展API
		function onPlusReady() {
			plus.geolocation.getCurrentPosition( function ( p ) {
				$('#initial_position').val(p.address.poiName);
			}, function ( e ) {
			//	alert( "Geolocation error: " + e.message );
			} );
		}
		
		//判断起始位置是否有值
		$('#initial_position').on('blur',function(){
			if($(this).val() == ""){
				mui.toast('请输入起始位置');return;
			} else {
				//判断起始位置没有值
				if($('#initial_position').val() !="" && $('#map_num').val()!=""){
					$('#call_driver').attr('disabled',false);
				}
			}
		})
		
	</script>
</html>